<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>魏远商城</title>
		<meta name="viewport" content="initial-scale=1, maximum-scale=1">
		<link rel="shortcut icon" href="/favicon.ico">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		
		<link rel="stylesheet" href="css/my-order.css" />
		<link rel="stylesheet" href="css/style.css" />
		<style>
			.my-coupon-content>div{
				/*background-image: url(img/fuliquan.png);
				background-position: center;
				background-size: cover;
				background-repeat: no-repeat;*/
				width: 100%;
				height: 7rem;
				position: relative;
				margin-bottom: .5rem;
			}
			.money{
				color: white;
				font-size: .8rem;
				position: absolute;
				bottom: 2rem;
				right: 1rem;
				letter-spacing: 5px;
			}
			.time{
				color: white;
				font-size: .8rem;
				position: absolute;
				bottom: .5rem;
				right: 1rem;
				letter-spacing: 5px;
			}
		</style>
	</head>
		
	<body style="background: #eaeef1;">
		<header class="bar bar-nav return-header" style="width: 100%;">
			<span class="order-back mui-action-back"><img src="img/back-le.png" height="50%"/></span>
			<h1 class="title" style="line-height: 2.2rem;">单位福利袋</h1>
		</header>
		
		<div class="my-coupon-content">
			<!--<div style="background-image: url(img/fuliquan.png);background-repeat: no-repeat;background-position: center;background-size: cover;"><p>已经到账余额<span></span>元</p></div>
			<img src="img/my-coupon-content-fi.png" width="100%"/>
			<img src="img/my-coupon-content-fi.png" width="100%"/>-->
		</div>

		<script src="js/jquery-3.1.1.min.js"></script>
		<script src="js/mui.min.js"></script>
		<script src="js/url.js"></script>
		<script type="text/javascript">
			mui.init({
				swipeBack:true //启用右滑关闭功能
			});
			
//			$.ajax({
//				url:ur+'/mobilemember/frontmember/getEmployeesCoupon',
//				type: 'POST',
//				headers: {
//					"X-Token": localStorage.token
//				},
//				dataType: 'json',
//				success:function(data){
//					console.log(data);
//				},
//			});
			
			/*获取账单列表*/
			$(function(){
			    $.ajax({
						url: ur + '/mobilemember/frontmember/getEmployeesCoupon',
						type: 'POST',
						headers: {
							"X-Token": localStorage.token
						},
						dataType: 'json',
						data: '',
						success:function(data){
							console.log(data);
							if(data.result.meta.code==200){
							
							for(var i=0;i<data.result.data.emplogList.length;i++){
								var time = data.result.data.emplogList[i].creageTime;
								var tim= time.substring(0,10);
								var div = ('<div style="background-image: url(img/fuliquan.png);background-position: center;background-size: cover;"><p class="money">已到账余额<span>'+data.result.data.emplogList[i].balance+'</span>元</p><p class="time">'+tim+'</p></div>');
								
								$('.my-coupon-content').append(div);
							}
						   }
						}
					})

				})
		</script>
	</body>

</html>